SpatialStream® Code Examples

Demographic Thematic

This example demonstrates how to simply add the Demographic layer to a map, apply thematic styling and add identify interactivity.

SLD | GetMap


layer = new Dmp.Layer.WmsLayer("DEMOG", "SS", {
antiAlias: true
});
layer.addChild("poly", "SS.DEMOG.B.C/BLOCKGROUP", "samplesite.dmp.styles.blockgroup/AnnExp.sld.xml", {
zIndex: 100, zoomRange: {
min: 4, max: 19
}
});
map.addEntity(layer);

//----------------

var url = "Identify.aspx" +
"?returnGeoType=3" +
"&dataSource=SS.DEMOG.B.C/BlockGroup" +
"&showSchema=false" +
"&lat=" + loc.latitude +
"&long=" + loc.longitude +
"&fields=*";

Dmp.Env.Connections["SS"].getJson(url, successCallback, errorCallback);


Run Sample   Back To Index